//===================================================================
// 西交投.NET产品框架 版权所有
//===================================================================
using System;
using System.ComponentModel.DataAnnotations;
using XCI.Core;

namespace XCI.Sys.Model
{
    /// <summary>
    /// 系统定时任务日志
    /// @author 吕艳阳
    /// </summary>
    [ApiModel(Caption = "系统定时任务日志")]
    public class SysJobLog
    {
        /// <summary>
        /// 任务日志主键
        /// </summary>
        [Display(Name = "任务日志主键")]
        [ApiModelProperty(PrimaryKey = true)]
        public string Id { get; set; }

        /// <summary>
        /// 任务主键
        /// </summary>
        [Display(Name = "任务主键")]
        public string JobId { get; set; }

        /// <summary>
        /// 任务名称
        /// </summary>
        [Display(Name = "任务名称")]
        public string JobName { get; set; }

        /// <summary>
        /// 任务表达式
        /// </summary>
        [Display(Name = "任务表达式")]
        public string JobExpression { get; set; }

        /// <summary>
        /// 触发类型 [1-手动触发, 0-系统触发]
        /// </summary>
        [Display(Name = "执行类型")]
        public int TriggerCategory { get; set; }

        /// <summary>
        /// 触发类型名称
        /// </summary>
        [Display(Name = "触发类型名称")]
        public string TriggerCategoryName { get; set; }

        /// <summary>
        /// 耗时值
        /// </summary>
        [Display(Name = "耗时值")]
        public int? CostTime { get; set; }

        /// <summary>
        /// 耗时
        /// </summary>
        [Display(Name = "耗时")]
        public string CostTimeName { get; set; }

        /// <summary>
        /// 任务执行消息
        /// </summary>
        [Display(Name = "任务执行消息")]
        public string Msg { get; set; }

        /// <summary>
        /// 任务执行错误信息
        /// </summary>
        [Display(Name = "任务执行错误信息")]
        public string ErrorMsg { get; set; }

        /// <summary>
        /// 执行状态 [true-成功, false-失败]
        /// </summary>
        [Display(Name = "执行状态")]
        public bool Status { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        [Display(Name = "开始时间")]
        public DateTime StartDateTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        [Display(Name = "结束时间")]
        public DateTime EndDateTime { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        public DateTime OperateDateTime { get; set; }

        /// <summary>
        /// 复制对象
        /// </summary>
        public SysJobLog Clone()
        {
            return (SysJobLog)MemberwiseClone();
        }
    }
}
